package main

import (
	"os"
	"text/template"
)

// 模板变量$

func main() {
	t := template.New("test")
	t = template.Must(t.Parse("{{with $3 := `Hello`}}{{$3}} Golang {{end}}!\n"))
	t.Execute(os.Stdout, nil)

	t = template.Must(t.Parse("{{with $x3 := `Hola`}}{{$x3}} Java{{end}}!\n"))
	t.Execute(os.Stdout, nil)

	t = template.Must(t.Parse("{{with $x_1 := `Hey`}}{{$x_1}} - {{.}} - {{$x_1}}{{end}}"))
	t.Execute(os.Stdout, nil)
}
